package com.dom.domweb.dao.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.dom.domweb.dao.entity.TUserRoleRel;
import com.dom.domweb.dao.mapper.TUserRoleRelMapper;
import com.dom.domweb.dao.service.ITUserRoleRelService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * B_用户角色信息表 服务实现类
 * </p>
 *
 * @author xllei
 * @since 2018-11-19
 */
@Service
public class TUserRoleRelServiceImpl extends ServiceImpl<TUserRoleRelMapper, TUserRoleRel> implements ITUserRoleRelService {
    @Override
    public List<TUserRoleRel> findByUserId(int userId) {
        Wrapper<TUserRoleRel> wrapper = new EntityWrapper<>();
        wrapper.eq("user_id", userId);
        return this.selectList(wrapper);
    }
}
